//
//  TransitionAnimator.swift
//  CustomTransition
//
//  Created by CaryaLiu on 2021/10/14.
//

import UIKit

class TransitionAnimator: NSObject {
    static func create(with transitionType: TransitionType) -> UIViewControllerAnimatedTransitioning? {
        switch transitionType {
        case .slide(let direction, let operation):
            switch operation {
            case .push:
                return SlidePushAnimator(direction: direction)
            case .pop:
                return SlidePopAnimator(direction: direction)
            default:
                return nil
            }
        }
        
    }
}
